<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/theme/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/theme/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/theme/style.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/theme/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/theme/bootstrap.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/theme/ckform.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/theme/common.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.ext.js"></script>
 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form action="{:U('User/edit')}" method="post" class="definewidth m20">
<input type="hidden" name="id" value="{$user.id}" />
    <table class="table table-bordered table-hover definewidth m10">
        
        <tr>
            <td width="30%" style="text-align: right;" class="tableleft">开户行</td>
            <td><input type="text" id="bankName" name="bankName" value="${bankCard.bankName}"/></td>
        </tr>
        <tr>
            <td width="30%" style="text-align: right;" class="tableleft">卡&nbsp;&nbsp;&nbsp;&nbsp;号</td>
            <td><input type="text" id="bankUserNo" name="bankUserNo" value="${bankCard.bankUserNo}"/></td>
        </tr>
        <tr>
            <td width="30%" style="text-align: right;" class="tableleft">持卡人</td>
            <td><input type="text" id="bankUserName" name="bankUserName" value="${bankCard.bankUserName}"/></td>
        </tr>
        <tr>
            <td width="30%" style="text-align: right;" class="tableleft"></td>
            <td>
                <button type="button" class="btn btn-primary" id="saveBank" type="button">修改</button>				 
                <!-- &nbsp;&nbsp;
                <button type="button"  class="btn btn-success" name="backid" id="backid">关闭</button> -->
            </td>
        </tr>
    </table>
</form>
</body>
<script type="text/javascript">

    $(function () {       
		$('#backid').click(function(){
				//window.location.href="{:U('User/index')}";
		 });
		$('#saveBank').click(function(){
			if($("#bankName").val()==""){
				layer.alert("请输入开户行名称 ");
				return;
			}
			if($("#bankUserNo").val()==""){
				layer.alert("请输入开会行卡号");
				return;
			}
			if($("#bankUserName").val()==""){
				layer.alert("请输入开户人名称");
				return;
			}
			$.post("${pageContext.request.contextPath}/admin/update_bank_save_mobile.html",
		       {"bankName":$("#bankName").val(),"bankUserNo":$("#bankUserNo").val(),"bankUserName":$("#bankUserName").val()},
		       function(data){
		            	var json = eval("("+data+")");
						if(json.statusCode =='200'){
							layer.msg(" 操作成功 ", {icon: 1});
						}else{
							layer.msg(json.message, {shift: 6});
						}
		      });
		 });
		
    });
    function closewind(){
    	window.location.href="${pageContext.request.contextPath}/admin/logout.html";
    }
    
</script>
</html>